package com.example.yc23.demo.controller.fore;

import com.example.yc23.demo.pojo.User;
import com.example.yc23.demo.service.UserService;
import com.example.yc23.demo.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/fore/user")
public class ForeUserController {
    @Autowired
    private UserService userService;
    @PostMapping(path = "/login",consumes = MediaType.APPLICATION_JSON_VALUE)
    public JsonResult<User> login(@RequestBody User user){
        return userService.login(user);
    }


}
